package com.dyzs.util;

import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;


public class ProcessUtil {

	
	public static boolean checkBrowser(Context context,String packageName) {   
 	    if (packageName == null || "".equals(packageName))   
 	        return false;   
 	    try {   
 	        ApplicationInfo info = context.getPackageManager().getApplicationInfo(   
 	                packageName, PackageManager.GET_UNINSTALLED_PACKAGES);   
 	        return true;   
 	    } catch (NameNotFoundException e) {   
 	        return false;   
 	    }   
 	}  
 	
 	
	public static Intent starBrowser(String packageName,String activity) {   
		Intent t = new Intent();   
		t.setClassName(packageName,activity);
		return t;
 	} 
}
